home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AOL File Library: 2,801 to 2,900
/
aol-file-protocol-4400-2801-to-2900.zip
/
AOLDLs
/
C++ Files Library
/
Point_Rect C++ Classes
/
MacObj.sit
/
MacObj ƒ
/
CPoint.cp
next >
Wrap
Text File
|
1993-09-11
|
1KB
|
56 lines
#ifdef _MACOBJ_SPEED
#define _MACOBJ_INLINE inline
#else
#define _MACOBJ_INLINE
#include "CPoint.h"
#endif
_MACOBJ_INLINE CPoint::CPoint()
{
}
_MACOBJ_INLINE CPoint::CPoint(short ih, short iv)
{ h = ih; v = iv; }
_MACOBJ_INLINE CPoint::CPoint(Point p)
{ *(Point*)this = p; }
_MACOBJ_INLINE void CPoint::Offset(short oh, short ov)
{ h+=oh; v+=ov; }
_MACOBJ_INLINE void CPoint::Offset(Point p)
{ h+=p.h; v+=p.v; }
_MACOBJ_INLINE Boolean CPoint::operator==(Point p) const
{ return h == p.h && v == p.v; }
_MACOBJ_INLINE Boolean CPoint::operator!=(Point p) const
{ return h != p.h || v != p.v; }
_MACOBJ_INLINE void CPoint::operator+=(Point p)
{ h+=p.h; v+=p.v; }
_MACOBJ_INLINE void CPoint::operator-=(Point p)
{ h-=p.h; v-=p.v; }
_MACOBJ_INLINE CPoint CPoint::operator+(Point p) const
{ return CPoint(h+p.h, v+p.v); }
_MACOBJ_INLINE CPoint CPoint::operator-(Point p) const
{ return CPoint(h-p.h, v-p.v); }
_MACOBJ_INLINE CPoint CPoint::operator-() const
{ return CPoint(-h, -v); }
_MACOBJ_INLINE void CPoint::Move(void)
{ ::Move(h, v); }
_MACOBJ_INLINE void CPoint::MoveTo(void)
{ ::MoveTo(h, v); }
_MACOBJ_INLINE void CPoint::Line(void)
{ ::Line(h, v); }
_MACOBJ_INLINE void CPoint::LineTo(void)
{ ::LineTo(h, v); }